package org.grayrabbit.cms.entity;

// Generated 2011-5-11 14:11:22 by Hibernate Tools 3.3.0.GA

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * CmsOperLog generated by hbm2java
 */
@Entity
@Table(name = "CMS_OPER_LOG")
public class OperLog implements java.io.Serializable {

	private static final long serialVersionUID = -3609647108912981519L;
	private String operLogId;
	private String operObjectId;
	private String operAct;
	private Date operTime;
	private String operIp;
	private String operFunc;
	private String memo;
	private String loginName;
	private String realName;
	private PublishTask publishTask;

	public OperLog() {
	}

	public OperLog(String operLogId) {
		this.operLogId = operLogId;
	}

	public OperLog(String operLogId, String operObjectId, String operAct,
			Date operTime, String operIp, String operFunc, String memo,
			String loginName, String realName) {
		this.operLogId = operLogId;
		this.operObjectId = operObjectId;
		this.operAct = operAct;
		this.operTime = operTime;
		this.operIp = operIp;
		this.operFunc = operFunc;
		this.memo = memo;
		this.loginName = loginName;
		this.realName = realName;
	}

	@Id
	@Column(name = "OPER_LOG_ID", unique = true, nullable = false, length = 32)
	@GeneratedValue(generator = "paymentableGenerator")       
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid") 
	public String getOperLogId() {
		return this.operLogId;
	}

	public void setOperLogId(String operLogId) {
		this.operLogId = operLogId;
	}

	@Column(name = "OPER_OBJECT_ID", length = 32)
	public String getOperObjectId() {
		return this.operObjectId;
	}

	public void setOperObjectId(String operObjectId) {
		this.operObjectId = operObjectId;
	}

	@Column(name = "OPER_ACT", length = 32)
	public String getOperAct() {
		return this.operAct;
	}

	public void setOperAct(String operAct) {
		this.operAct = operAct;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "OPER_TIME", length = 7)
	public Date getOperTime() {
		return this.operTime;
	}

	public void setOperTime(Date operTime) {
		this.operTime = operTime;
	}

	@Column(name = "OPER_IP", length = 64)
	public String getOperIp() {
		return this.operIp;
	}

	public void setOperIp(String operIp) {
		this.operIp = operIp;
	}

	@Column(name = "OPER_FUNC", length = 32)
	public String getOperFunc() {
		return this.operFunc;
	}

	public void setOperFunc(String operFunc) {
		this.operFunc = operFunc;
	}

	@Column(name = "MEMO", length = 256)
	public String getMemo() {
		return this.memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	@Column(name = "LOGIN_NAME", length = 32)
	public String getLoginName() {
		return this.loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	@Column(name = "REAL_NAME", length = 32)
	public String getRealName() {
		return this.realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TASK_ID")
	public PublishTask getPublishTask() {
		return publishTask;
	}

	public void setPublishTask(PublishTask publishTask) {
		this.publishTask = publishTask;
	}

}
